In Computer Science, a regular tree grammar (RTG)[1] is a formal grammar that describes a set of directed trees.
Contents |
A regular tree grammar is defined by the tuple
,
where
The grammar implicitly defines a set of trees: any tree that can be derived from using the rule set is said to be described by . This set of trees is known as the language of . To express this more formally, we define the relation on the set as follows:
For every , if there is a context and a production such that:
The tree language generated by is the language
.
Where denotes successive applications of . Such languages are called Tree languages.
As shown by Rajeev Alur and Parthasarathy Madhusudan[2][3] the class of regular tree languages coincides with nested words and visibly pushdown languages.